package com.asset.dispoal.business.casedispose.service.command;

import com.asset.dispoal.business.casedispose.domain.db.mapper.CasedisposeMapper;
import com.asset.dispoal.business.casedispose.dto.CaseDisposeNormalUpdateRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tech.mhuang.pacebox.core.ddd.BaseCommand;
import tech.mhuang.pacebox.springboot.protocol.Result;

@Component
public class CaseDisposeUpdateNormalCommand implements BaseCommand<CaseDisposeNormalUpdateRequest, Result> {

    @Autowired
    private CasedisposeMapper casedisposeMapper;


    @Override
    public Result execute(CaseDisposeNormalUpdateRequest request) {
        casedisposeMapper.updateMoney(request.getId(), request.getLawsuitPrincipalAmount());
        return Result.ok();
    }
}
